package gdma.hqdes.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import gdma.hqdes.bean.HqdIndexArg;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HqdIndexArgMapper extends BaseMapper<HqdIndexArg> {

    @Select("select a.* from hqd_index_arg a where a.index_id=#{indexId}")
    List<HqdIndexArg> selectByIndexId(long indexId);

    @Select("select a.* from hqd_index i, hqd_index_arg a where i.id=a.index_id and i.ver_id=#{verId}")
    List<HqdIndexArg> selectByIndexVerId(long verId);

    @Delete("delete from hqd_index_arg a where a.index_id=#{indexId}")
    int deleteByIndexId(long indexId);

}
